function getUrlParam(name) {
                var regexS;
                var regexl;
                var results;
             
                name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
                regexS = "[\\?&]"+name+"=([^&#]*)";
                regex = new RegExp(regexS);
                results = regex.exec (window.location.href);
                        //note: don't write space after command exec
             
                if ( results == null ) {
                    return "";
                } else {
                    return results[1];
                }
};